{{define "navbar"}}
<a href="/" class="navbar-brand">我的博客</a>
<div>
    <ul class="nav navbar-nav">
        <li {{if .isHome}}class="active" {{end}}><a href="/">首页</a></li>
        <li {{if .isCategory}}class="active" {{end}}><a href="/category">分类</a></li>
        <li {{if .isTopic}}class="active" {{end}}><a href="/topic">文章</a></li>
    </ul>
</div>
<div class="pull-right">
    <ul class="nav navbar-nav">
        {{if .isLogin}}
        <li><a href="/login?exit=true">退出登录</a></li>
        {{else}}
        <li><a href="/login">登录</a></li>
        {{end}}
    </ul>
</div>
{{end}}